<title>About this tool:</title>
A comparator circuit compares two voltages and outputs either a High (the voltage at the plus side) or a Low (the voltage at the negative side) to indicate which is larger. Comparators are often used to check if an input has reached a specific voltage level.

This comparator circuit does not have a feedback and thus also does not have a hysteresis. The circuit amplifies the voltage difference between Vin and Vref, and it outputs the result at Vout.

<bold>Inverting:</bold>
• If Vref is greater than Vin, then the voltage at Vout will rise to its positive saturation level.
• If Vref is lower than Vin, then Vout will fall to its negative saturation level.

<_image>Calc3Sub08_pic03.png</_image>

Example:
V+: 5V
Vref: 2.5V
<_image>Calc3Sub08_pic06_NI.jpg</_image>

<bold>Non-Inverting:</bold>
• If Vref is lower than Vin, then the voltage at Vout will rise to its positive saturation level.
• If Vref is greater than Vin, then Vout will fall to its negative saturation level.

<_image>Calc3Sub08_pic05.png</_image>

Example:
V+: 5V
Vref: 2.5V
<_image>Calc3Sub08_pic07_NI.jpg</_image>

Please Note: noise on the input signal can cause the input to transition above and below the threshold causing an erratic output. See the below screenshot from a TI application note (Ref: "Comparator with Hysteresis Reference Design" by Art Kay, Timothy Claycomb). To overcome this issue, hysteresis must be added.

<_image>Calc3Sub08_pic08_NI.jpg</_image>

